﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Mechanics {
    import flash.utils.*;

    public class MechanicConfigData {

        public var priority:int = 0;
        public var type:String;
        public var className:String;
        public var params:Dictionary;
        protected var m_rawXMLConfig:XML;

        public function MechanicConfigData(_arg1:XML){
            this.m_rawXMLConfig = _arg1;
            this.parseRawMechanicXML();
        }
        protected function parseRawMechanicXML():void{
            var _local2:XML;
            var _local1:XML = this.rawXMLConfig;
            this.priority = int(_local1.@priority);
            this.type = String(_local1.@type);
            this.className = String(_local1.@className);
            this.params = new Dictionary();
            for each (_local2 in _local1.attributes()) {
                this.params[String(_local2.name())] = String(_local2);
            };
        }
        public function get rawXMLConfig():XML{
            return (this.m_rawXMLConfig);
        }
        public function resetMechanicToXMLConfig():void{
            this.parseRawMechanicXML();
        }

    }
}//package Mechanics 
